correct typeguard for union object array iteration